﻿using System;
using System.Windows.Forms;

namespace Latin_Vocabulary_Indicator
{
    public partial class confirmbox : Form
    {
        private Action<bool> _backFunc;
        public confirmbox(string textContent, string confirmText,Action<bool> backFunc)
        {
            InitializeComponent();
            _backFunc = backFunc;
            title.Text = textContent;
            yes.Text = confirmText;
        }

        private void yes_Click(object sender, EventArgs e)
        {
            _backFunc.Invoke(true);
            Close();
        }

        private void cancel_Click(object sender, EventArgs e)
        {
            _backFunc.Invoke(false);
            Close();
        }
    }
}
